<html>
<head>
<script src="webCountdown.js" ></script>
</head>
</head>

<body>

<?php
include_once('webCountdown.php');


// 1st example: using PHP
$id = 'c1'; 

echo '<div style="text-align:center;background:#FFCCCC;border:2px solid #474D3D">';
echo 'There are';
echo '<div style="font-size:3em;"  id="countDownClockDays'.$id.'"></div>';
echo '<div>days</div>';
echo '<div id="countDownClockTime'.$id.'"></div>';
echo 'till the END<br> of the CENTURY</div>';


$today = WebCountdown::buildDate(false); 
$party = WebCountdown::buildDate(date("2100-01-01 00:00:00")); // use format Year-month-day with zeroes

echo '<script>
var '.$id.' = new webCountdown('.$today.','.$party.',"'.$id.'");
setInterval('.$id.'.actualize,1000);
</script>';

echo '<br>';


// 2nd example: using Javascript
$id = 'c2';
$party = WebCountdown::buildDate(date("2014-04-03 16:38:29"));

echo "<script>
document.write('<div style=\"text-align:center;background:#CCFFCC;border:2px solid #474D3D\">There are<div style=\"font-size:3em;\" id=\"countDownClockDays".$id."\"></div><div>days</div>');
document.write('<div id=\"countDownClockTime".$id."\"></div>till 04:38:29PM<br> of April 3rd, 2014</div><br>');

var ".$id." = new webCountdown(".$today.",".$party.",'".$id."');
setInterval(".$id.".actualize,1000);
</script>
";

?>
</body>
</html>